package com.cn.boot.student.entity;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "dict", schema = "stu_manage_sys", catalog = "")
public class DictEntity {
    private int id;
    private String type;
    private String app;
    private String code;
    private String text;
    private Byte order;
    private Byte isDel;

    @Id
    @Column(name = "id")
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "type")
    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    @Basic
    @Column(name = "app")
    public String getApp() {
        return app;
    }

    public void setApp(String app) {
        this.app = app;
    }

    @Basic
    @Column(name = "code")
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    @Basic
    @Column(name = "text")
    public String getText() {
        return text;
    }

    public void setText(String text) {
        this.text = text;
    }

    @Basic
    @Column(name = "order")
    public Byte getOrder() {
        return order;
    }

    public void setOrder(Byte order) {
        this.order = order;
    }

    @Basic
    @Column(name = "is_del")
    public Byte getIsDel() {
        return isDel;
    }

    public void setIsDel(Byte isDel) {
        this.isDel = isDel;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        DictEntity that = (DictEntity) o;
        return id == that.id &&
                Objects.equals(type, that.type) &&
                Objects.equals(app, that.app) &&
                Objects.equals(code, that.code) &&
                Objects.equals(text, that.text) &&
                Objects.equals(order, that.order) &&
                Objects.equals(isDel, that.isDel);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, type, app, code, text, order, isDel);
    }
}
